package com.yq.design.singleton.eStaticBlock;

/**
 * @ClassName Singleton
 * @Description 饿汉式-静态代码块
 * @Author yaoqiang
 * @Date 2021/3/8 18:55
 * @Version 1.0
 */
public class Singleton {
    private Singleton() {
    }
    private static   Singleton instance;
    static {
        instance=new Singleton();
    }

    public static Singleton getInstance(){
        return  instance;
    }

}
